using UnityEngine;
using System.Collections;

public class Exit : MonoBehaviour
{
	// Use this for initialization
	void Awake ()
	{
	}
	
	// Update is called once per frame
	void Update ()
	{
	
	}

	void OnClick(){
		Destroy (transform.parent.parent.FindChild ("ClassArrows(Clone)").gameObject);
		transform.parent.GetComponents<TweenPosition> () [0].Play (false);
		transform.parent.GetComponent<FileCover> ().bDestroy = true;
		GameObject.Find ("RightWdw").GetComponent<RightWdwMgr> ().bSwipeToTop = false;
		GameObject.Find ("HireApply(Clone)").GetComponent<HireApply> ().bFileCoverOn = false;
		GameObject.Find ("HireApply(Clone)").transform.FindChild("Label").GetComponent<UILabel>().text = "HIRE";
		if(GameObject.Find ("HireApply(Clone)").transform.FindChild ("Check(Clone)") != null)
			GameObject.Find ("HireApply(Clone)").transform.FindChild ("Check(Clone)").GetComponent<Check> ().DestroyThis ();
	}
}

